#!/bin/bash


set -exuo pipefail

git apply script/patches/use-cross-platform-livekit.patch

# Re-enable error skipping for this check, so that we can unapply the patch
set +e

cargo check -p workspace
exit_code=$?

# Disable error skipping again
set -e

git apply -R script/patches/use-cross-platform-livekit.patch

exit "$exit_code"
